<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
    <div>这是下一页</div>
    <button id="btn">上一页</button>
    <button id="btn2">下一页</button>
    <script>
        document.getElementById('btn').onclick=function(){
            history.back()
        }
        document.getElementById('btn2').onclick=function(){
            history.forward()
        }
    </script>
</body>
</html>